class_name SlotManager
extends Node2D

#region 属性
@export var slot_infos:Array[SlotInfo]
var slot_info_dict:Dictionary
var inited:bool = false
#endregion
#region 字段
#endregion
#region 信号
#endregion

#region 基类方法
#endregion
#region 公共方法
func init():
	slot_info_dict = {}
	for slot_info in slot_infos:
		if slot_info_dict.has(slot_info.slot_type):
			continue
		slot_info_dict[slot_info.slot_type] = slot_info
	inited = true
func get_slot_by_type(slot_type:GameEnum.SlotType,index:int = 0) -> Node2D:
	if not inited:
		init()
	if not slot_info_dict.has(slot_type) or slot_info_dict[slot_type].paths.size() <= index:
		return null
	return get_node(slot_info_dict[slot_type].paths[index])
#endregion
#region 私有方法
#endregion
#region 生命周期函数
#endregion
